home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / clktmr42.zip / CLKTIMER.DOC < prev   
Text File  |  1994-02-20  |  22KB  |  459 lines

  1.      CLKTIMER - Clock and task performing TSR (v4.20)
  2.                 Copyright 1994 by Roger Brook
  3.  
  4.      MEMORY REQUIREMENT: less than 3K bytes for an 8 task stack
  5.  
  6.      INTERRUPT VECTORS ATTACHED: 09h, 1Ch, 21h, 22h
  7.  
  8.      PURPOSE: A TSR to perform tasks at designated times.  Tasks that can
  9.               be performed include displaying the current time (and
  10.               optionally date) in the upper right hand corner of the
  11.               screen, sounding and displaying an alarm in the upper left
  12.               hand corner of the screen, booting the computer, and
  13.               forcing keystrokes into the keystroke buffer to start or
  14.               terminate a DOS program.
  15.  
  16.               Keystroke tasks (a sequence of keystrokes) can be performed
  17.               at a set time, each hour at a specified number of minutes
  18.               after the hour, or after the computer has been idle for a
  19.               specified number of seconds.
  20.  
  21.               CLKTIMER is intended to used in a batch file to set up a
  22.               sequence of tasks to be performed on an unattended basis.
  23.               CLKTIMER can be run anytime, with new tasks added to the list
  24.               of tasks to be performed, or old tasks disabled.
  25.  
  26.      SYNTAX:  CLKTIMER /[a,b,c,d,i,r,u,w,x][u,a,d] [nn[:nn]] [[?]string]
  27.  
  28.               The slash is interpreted as the start of another delimited
  29.               argument on the command line; therefore every argument must
  30.               begin with a slash.  The square brackets in the syntax line
  31.               above denote optional parameters, and should not be used as a
  32.               part of the arguments.  Recognized arguments are listed
  33.               below.  Any unrecognized argument will cause the program to
  34.               display a help screen of information similar to this syntax
  35.               section.  Arguments can be concatenated upto the allowed
  36.               length of the command line (or a maximum of 256 characters).
  37.  
  38.               Recognized arguments which must follow immediately after the
  39.               slash are (case not significant):
  40.  
  41.                    a = set alarm time and message
  42.                        alarm will both chime and display the specified
  43.                        message; chime will end when the next key is pressed
  44.                        by the user; message displayed for one minute;
  45.  
  46.                    b = set boot time
  47.                        computer will boot at the beginning of the minute
  48.                        of the hour specified;
  49.  
  50.                    c = set clock only display
  51.                        will disable date display if it was previously set;
  52.                        display is in reverse video in the upper right hand
  53.                        corner of the screen
  54.  
  55.                    d = set clock and date display
  56.                        will override clock only display if it was
  57.                        previously set; display is in reverse video in the
  58.                        upper right hand corner of the screen
  59.  
  60.                    h = set chime for sounding the hour;
  61.  
  62.                    i = set idle time (seconds) and command
  63.                        idle time count is reset for each key pressed;
  64.  
  65.                    r = set repeat time (minutes after the hour) and command;
  66.  
  67.                    s = display the current task settings
  68.  
  69.                    u = unload (remove) all events from the stack
  70.                        affects on a, b, r and x options set which
  71.                        are the only ones put on the stack; should be the
  72.                        first option on the command line
  73.  
  74.                    w = set time to wait until executing a command
  75.                        can set only one time increment (hours and minutes)
  76.                        from the current time for the task to be executed
  77.  
  78.                    x = set execute time and command
  79.  
  80.               Secondary flags which must follow immediately after the
  81.               argument character are:
  82.  
  83.                    a = mark this task to be done only if a DOS program is
  84.                        not running at the specified time
  85.  
  86.                    u = mark this task to be done at the specified time, even
  87.                        if a DOS program is running
  88.  
  89.                    d = delete the task previously set for the time specified
  90.  
  91.              For example:
  92.  
  93.                CLKTIMER /a 12:00 'LUNCH TIME'     set an alarm for 12:00
  94.                                                   (noon) to display the
  95.                                                   message LUNCH TIME
  96.  
  97.                CLKTIMER /ad 12:00                 disable the alarm
  98.                                                   previously set for 12:00,
  99.                                                   but keep the same display
  100.                                                   string
  101.  
  102.               Specifying the time is done in a 24 hour format for alarm
  103.               times, boot times and time to execute a task, and uses two
  104.               number separated by a colon ( : ); a zero will be assumed if
  105.               the number of minutes is not specified.  For the repeat time
  106.               (minutes after the hour) and the idle time (number of
  107.               seconds) only a single number is used.  Hours must be in the
  108.               range [0..23], minutes and seconds must be in the range
  109.               [0..59].  A blank in the time specification will be assumed
  110.               to be a zero.
  111.  
  112.               The command string or alarm display string are after the time
  113.               specification for the argument.  The string is generally a
  114.               combination of text delimited by quote marks ( ' ) and
  115.               representations of special keystrokes.  Special keystrokes
  116.               include any decimal ASCII representation of a keystroke (for
  117.               example the carriage return or enter key is 013), or a scan
  118.               code which begins with the at sign ( @ ).  Scan codes are not
  119.               tested for accuracy, only inserted into the keystroke buffer.
  120.               Therefore, extended keyboard scan codes can be used if your
  121.               computer recognized an extended keyboard.  Since the keyboard
  122.               buffer is manipulated directly, there can be a maximum of 16
  123.               keystrokes specified.
  124.  
  125.               If a command string begins with the question mark character
  126.               ( ? ), this is interpreted to mean that a reboot is desired
  127.               instead of pushing the string into the keyboard buffer.
  128.               The remainder of the command string is ignored, and a reboot
  129.               begins immediately.
  130.  
  131.               The first time the program is run, the task settings specified
  132.               are loaded with the TSR version of the program.  If the program
  133.               is already loaded, then the arguments will modify the task
  134.               settings of the TSR version of the program (i.e. will change
  135.               the memory resident data storage).  The program will run in
  136.               high memory, but cannot find itself in high memory for
  137.               subsequent commands.
  138.  
  139.      DEFAULTS:  The task information is stored in a stack format.  The default
  140.               stack size is 8 events (Alarm, Boot, Repeat and eXecute).  The
  141.               size of the task stack con be increased on request when
  142.               CLKTIMER is registered, or at no charge for registered versions
  143.               with a written request and a diskette in a self-address, stamped
  144.               mailer.  The Idle and Wait tasks have there own data area with
  145.               a limit of one task for each.  Defaults for each task are
  146.               as follows:
  147.  
  148.               a     time defaults to 00:00
  149.                     display defaults to a null string
  150.                     task is DOS unaware
  151.                     there are no alarms set initially
  152.  
  153.               b     boot time defaults to 00:00
  154.                     task is DOS unaware
  155.                     there are not boot times set initially
  156.  
  157.               c     clock display defaults to off
  158.                     task is DOS unaware
  159.  
  160.               d     date and clock display defaults to off
  161.                     task is DOS unaware
  162.  
  163.               h     hour chime defaults to off (not sounded)
  164.                     task is DOS unaware
  165.  
  166.               i     time defaults to 300 seconds
  167.                     command defaults to 'C:\IDLE' 013 or previous setting
  168.                     task is DOS aware
  169.                     the idler timer defaults to off
  170.  
  171.               r     time defaults to 00 minutes after each hour
  172.                     command defaults to a null string
  173.                     task is DOS aware
  174.                     there is no repeat time set initially
  175.  
  176.               w     time defaults to 00:00 increment from the current time
  177.                     command defaults to null string or previous setting
  178.                     task is DOS aware
  179.                     there is not wait time set initially
  180.  
  181.               u     unload option is always DOS unaware
  182.  
  183.               x     time defaults to 00:00
  184.                     command defaults to a null string
  185.                     task is DOS aware
  186.                     there are no execute times set initially
  187.  
  188.      EXAMPLES:
  189.               CLKTIMER /a 16:45 'Clean up time'
  190.                    set an alarm task for 4:45 pm to display  Clean up time
  191.  
  192.               CLKTIMER /b2:59
  193.                    set a task to boot the computer at 2:59 am
  194.  
  195.               CLKTIMER /c /h
  196.                    set two tasks, one to display the clock in the upper
  197.                    right hand corner of the display (this will disable the
  198.                    date display if previously set) and one to toggle the
  199.                    hour chime (will be turned on if this is the first time
  200.                    CLKTIMER is run)
  201.  
  202.               CLKTIMER /D
  203.                    set a task to display the date and time in the upper
  204.                    right hand corner of the display
  205.  
  206.               CLKTIMER /h
  207.                    toggle the hour chime (turn it on if previously off, or
  208.                    turn it off if previously on)
  209.  
  210.               CLKTIMER /I 60
  211.                    set a task to monitor the idle status of the computer
  212.                    and to start the program C:\IDLE after the computer has
  213.                    been idle for 60 seconds
  214.  
  215.               CLKTIMER /i60 'C:\bat\idle.bat' 013
  216.                    set a task to monitor the idle status of the computer
  217.                    and to start the batch program C:\BAT\IDLE.BAT after the
  218.                    computer has been idle for 60 seconds
  219.  
  220.               CLKTIMER /ru55
  221.                    set a task to start the program C:\REPEAT at 55 minutes
  222.                    after every hour (24 hours per day); task will be DOS
  223.                    unaware (will be done even if a DOS program is running)
  224.  
  225.               CLKTIMER /S
  226.                    display the current status and list of tasks set for the
  227.                    copy of CLKTIMER which is resident in memory (TSR)
  228.  
  229.               CLKTIMER /u
  230.                    unload (erase) all pending events (type a, b, r and x)
  231.                    from the stack; return the stack to default (empty)
  232.                    condition
  233.  
  234.               CLKTIMER /w1:00 'wait_1hr' 13
  235.                    set a task that at 1 hr and 00 minutes from the current
  236.                    time will start the program WAIT_1HR (the DOS PATH will
  237.                    be searched for the program)
  238.  
  239.               CLKTIMER /w1:00'?reboot'
  240.                    set a task that at 1 hr and 00 minutes from the current
  241.                    time will reboot the computer
  242.  
  243.               CLKTIMER /x9:20 'at9_20' 13
  244.                    set a task that at 9:20 am will start the program AT9_20
  245.                    (the DOS PATH will be searched for the program)
  246.  
  247.               CLKTIMER /da /h /i120 /a12:00'LUNCH TIME' /B2
  248.                    set a task to display date and time (date and time task
  249.                    is DOS aware, and so will not display if a DOS program
  250.                    is running), toggle the hour chime, set a task to monitor
  251.                    the idle status and start the program C:\IDLE after 120
  252.                    seconds of being idle, set an alarm task to display
  253.                    LUNCH TIME  at 12:00 (noon) and set a task to boot the
  254.                    computer at 2:00 am
  255.  
  256.      CAUTIONS: DOS BIOS calls have been used as much as possible
  257.               to help maintain compatibility with different operating
  258.               system implementations.  The major exception is the direct
  259.               manipulation of the keyboard buffer and getting the time bytes
  260.  
  261.               Time information is take directly from the BIOS data area,
  262.               and so programs may not work correctly if your BIOS does not
  263.               follow MS-DOS convention for location of this information.
  264.  
  265.               Keystrokes are stuffed directly into the DOS keyboard buffer,
  266.               and so programs may not work correctly if your BIOS or other
  267.               TSR's do not follow MS-DOS convention for location of this
  268.               data.
  269.  
  270.               Date information is obtained from DOS when the program is
  271.               first run, and then updated internally.  Date information is
  272.               also updated anytime the CLKTIMER program is run.  Therefore,
  273.               changing the date from the command line will change the
  274.               displayed date the next time CLKTIMER is run.  It should
  275.               be aware of leap years, and varying number of days per month.
  276.  
  277.               The information written to the screen is updated
  278.               approximately once each second.  If it scrolls off the top of
  279.               the screen, wait one second and it should reappear.
  280.  
  281.               CLKTIMER looks for itself only in low memory.  Therefore, it
  282.               is recommended that the program not be loaded in high memory.
  283.               User experience indicates that CLKTIMER will perform correctly
  284.               when loaded in high memory for commands that are included at
  285.               the time of initial loading.  However, CLKTIMER cannot find
  286.               itself in high memory, so subsequent changes will actually
  287.               load a second copy in low memory.
  288.  
  289.               The time, date and alarm information will only be displayed
  290.               for 40 or 80 column text modes (int 10h, modes 0-3 and 7).
  291.               In other screen modes, all other functions (including chimes)
  292.               still work.
  293.  
  294.               Windows 3.x: the boot feature and the chimes will work when
  295.               Windows is running; there will be no screen display unless
  296.               you have a DOS window running with the correct screen mode;
  297.               the function of the keystroke buffer under Windows has not
  298.               been investigated.
  299.  
  300.      UPGRADES: Version 2.01 fixed timer jump error which caused date to be
  301.               incremented after each minute of the first hour of the day;
  302.               changed time routine to get timer information directly from
  303.               BIOS data area instead of using 1Ah interrupt; moved repeat
  304.               code so that it is executed only if DOS is not active
  305.               (as specified in documentation).  31Aug92
  306.  
  307.               Version 2.02 fixed jump error caused by change to repeat code
  308.               in version 2.01;  execute command now performs correctly, when
  309.               previously the code was being skipped; also decreased size
  310.               of execute strings by 1 so their size matches specifications.
  311.               11Sep92
  312.  
  313.               Version 2.03 fixed jump error causing alarm information to not
  314.               be displayed when clock time or date information were not
  315.               displayed.  24Sep92
  316.  
  317.               Version 2.04 fixed problem with location of crt status byte
  318.               which was causing the computer to lock up if switched from
  319.               VGA to MDA mode.  23Oct92
  320.  
  321.               Version 2.1 added /w command to wait specified hours and
  322.               minutes from current time to stuff a command to keyboard.
  323.               05Oct92
  324.  
  325.               Version 3.0 added the secondary U and A flag to signify for
  326.               each task type whether they should be DOS unaware (U) or
  327.               aware (A).  The default awareness level of each task remains
  328.               are specified in version 2.xx.  Also added division routine
  329.               so that time displayed is correctly 18.2065 ticks per second.
  330.               Changed the format of the display and logic to show only task
  331.               events which are active.  Fixed problem with conflict between
  332.               wait task and boot tasks.  29Nov92
  333.  
  334.               Version 3.10 added the capability for any command string to be
  335.               a reboot command if the string begins with the ? character.
  336.               9May93
  337.  
  338.               Version 3.20 added the capability for changing the computer
  339.               date and having the date information internal to the TSR be
  340.               updated on the next execution of CLKTIMER.  31May93
  341.  
  342.               Version 3.21 fixed problem with date incrementing correctly
  343.               at the end of the month. 5Aug93
  344.  
  345.               Version 4.00 changed event storage method to a stack for repeat,
  346.               execute, boot and alarm events to reduce TSR space.  Shareware
  347.               stack size is 8 events, but can be custimized when ordering
  348.               registered version.  Also changed the software TSR to return
  349.               only code segment with all other code for loading an event moved
  350.               to the transient space.  Use of a software interrupt for
  351.               communicating with the resident code was eliminated and most
  352.               of the adjustment code was moved to the transient program
  353.               jun/jul93
  354.  
  355.               Version 4.10 added the /U option to unload (empty) the stack
  356.               of all pending events   28nov93
  357.  
  358.               Shareware version 4.20 corrected byte comparison code problem
  359.               when storing stack events which had resulted ignoring strings
  360.               beginning with extended key code (e.g. function keys).  20feb94
  361.  
  362.      DISCLAIMER: The program described above has been tested with MSDOS 3.3,
  363.               5.0 and 6.0, and when running under 4DOS and NDOS using
  364.               several hardware clones.  While it appears to perform
  365.               consistently as described, there is absolutely no guarantee
  366.               that it will do anything.  The author will not be responsible
  367.               for any loss or damages caused through the use of this
  368.               program.  No warranty, express or implied, is provided for
  369.               this software, it's performance, or it's usefulness for a
  370.               particular purpose.
  371.  
  372.               All trademarks mentioned are the property of their respective
  373.               owners.
  374.  
  375.               The program is Copyright 1992, 1993, 1994 by Roger Brook.
  376.  
  377.               You are encouraged to distribute the shareware version of this
  378.               program under the following conditions:
  379.  
  380.                  - all files contained in the archive or distribution disk
  381.                    must be distributed together in UNMODIFIED form
  382.  
  383.                  - you charge no more than a reasonable fee for copying or
  384.                    subscription, and clearly indicate that payment of such
  385.                    a fee does NOT grant ownership of the program
  386.  
  387.               You may evaluate this program for up to 30 days on a free
  388.               trial basis.  After 30 days, you should register your
  389.               continued use of this program.  The registration fee is $10
  390.               for use on a single computer (please specify disk size
  391.               desired), payable to the author at the address given below.
  392.               Site license requests in writing will be considered.
  393.  
  394.               Realistically, I don't expect to get rich from this effort.
  395.               Registration will get you a copy of the latest version of the
  396.               software, without the registration encouragement blurb.  I
  397.               will listen to and attempt to incorporate suggestions from
  398.               registered users.  If your suggestion is used, you will
  399.               receive a free copy of the updated program.
  400.  
  401.               Send comments and registration to:
  402.  
  403.                    Roger Brook
  404.                    523 Oakdale Drive
  405.                    Haslett MI 48840
  406.  
  407.               I do have a CompuServe and a Prodigy account, but I do not
  408.               monitor them on a regular basis.  If you want to send
  409.               your comments by electronic mail, sent them to either:     2
  410.  
  411.                    internet        BROOK@AGE.MSU.EDU
  412.                    bitnet          BROOK@MSUEGR
  413.  
  414.  
  415. ------------------------------------------------------------------------
  416.  
  417.                 REGISTRATION REQUEST FORM
  418.  
  419.  
  420.      PROGRAM:                        # COPIES:            AMOUNT:
  421.  
  422.      CLKTIMER v4.20 ($15 per copy)   _________          $______________
  423.  
  424.           Diskette Type Required:  5-1/4" (360K) ___
  425.  
  426.                                    3-1/2" (720K) ___
  427.  
  428.      TOTAL. . . . . . . . . . . . . . . . . . . . . . . $______________
  429.  
  430.  
  431.      PAYMENT BY:
  432.  
  433.      Check/Money Order No.__________ enclosed for $____________________
  434.  
  435.  
  436.      SHIPPING ADDRESS:
  437.  
  438.      NAME                ______________________________________________
  439.  
  440.      ADDRESS LINE 1      ______________________________________________
  441.  
  442.      ADDRESS LINE 2      ______________________________________________
  443.  
  444.      CITY/STATE/PROVINCE ______________________________________________
  445.  
  446.      COUNTRY/POSTAL CODE ______________________________________________
  447.  
  448.      DAYTIME PHONE       ______________________________________________
  449.  
  450.      FAX PHONE           ______________________________________________
  451.  
  452.      SEND TO:       Roger Brook
  453.                     523 Oakdale Drive
  454.                     Haslett  MI  48840
  455.  
  456. ------------------------------------------------------------------------
  457.  
  458.  
  459.